import {NewsParams,News} from './type'
import {get,post} from '../../utils/request' 
export const getList=(params:NewsParams):Promise<any> =>{

    return get("news/list",params);
}
export const getTypeList=():Promise<any> =>{

    return get("newstype/list",{psize:100});
}
export const deleteAll=(ids:number[])=>{

    return post("news/deleteall",{ids});
}
export const del=(id:number)=>{
  
    return get("news/delete",{id});
}
export const getNews=(id:number)=>{
  
    return get("news/get",{id});
}
export const add=(data:News)=>{

    return post("news/add",data);
}